WRM Trigger API
How to use the WRM Trigger API
Overview
The WRM Trigger API is available in the Chorus new integrated test environment, to support the onboarding of service companies to the Chorus Work Request Manager.
Prerequisites
Prerequisites for using the WRM Trigger API are:
- Access via the API developers portal has been requested by the Work Supplier and facilitated by Chorus.
- The Work Supplier, in collaboration with Chorus, has built their side of the WRM API (to be used in BAU).
- The Work Supplier, in collaboration with Chorus and this site, has built their side of the WRM Trigger API (NOT be used in BAU).
- Initial on-boarding requires some setup by Service Companies and Chorus in order to set up configuration data in key systems (for example Client IDs and secrets, PubSub subscriptions, Quantum subscribers, Authorization entities, work allocation rules, etc.). Chorus, through the API onboarding process / API developers portal assist with getting all work suppliers access to the environment with the required credentials.
When the Work Supplier has built to both the WRM API and WRM Trigger API, and has been granted access to the Onboarding Instance, they can:
- execute self-service testing of the integrations
- execute ongoing regression testing.
Create a task
POST /trigger/CreateTask
Use this endpoint to create a task to be assigned to you, as the work requestor.
The WRM Trigger API provides integration between Chorus and Service Company systems to facilitate the creation of Work Requests, that can be used to run test scenarios.
In a live scenario the Work Request process is triggered by the Work Requestor (Chorus) using a CreateTaskEvent:
1 The event is sent to the WRM API.
2 The event is processed by the WRM API.
3 The WRM API notifies the relevant Work Supplier of the work request using a CreateTaskNotify.
In an onboarding scenario the WRM Trigger API is used as a self-service mechanism for the Work Supplier to create a work request for testing, removing the need for Chorus involvement. This work request can be used to test one or more lifecycle scenarios.
Work Suppliers can specify certain attributes, others are set by default:
- The combination of attributes provided by the Work Supplier must result in the WRM allocating the work to this supplier. A Playbook is provided to each Service Company to assist.
- The attributes are injected into a CreateTaskEvent that is submitted to the WRM as if it has been sent by a Work Requestor.
See the work type instructions below for specific details.
The response details from WRM are passed back as part of the WRM Trigger response to the Work Supplier.
Once the work request has been allocated in the WRM, the Work Supplier receives a CreateTaskNotify (the same as BAU). Once a Work Request has been created via the WRM Trigger API, the Service Company uses the WRM API to progress standard Serco-initiated events.
Create a FibreConnect task
The following table describes the attributes required for creating a FibreConnect task:
Attribute | Details | Type |
---|---|---|
workType | FibreConnect | enum |
taskType | The appointment task type, e.g. FibreConnect (default if not specified), FibreSecondInConnect, FibreCPE. | enum |
siteVisitType | Appointment site visit type. For FibreConnect and FibreSecondInConnect taskTypes: Scope, Install, or Install/CSE. For FibreCPE tasks: CSE, ReplaceONT, or ReplaceONT/CSE. | enum |
mgmtArea | The exchange code. | string |
productZoneType | The product zone type, e.g. Non-UFB, UFB, UFB2, RBI. | enum |
greenFields | Indicates if the site is a greenfields development. | boolean |
row | Indicates if the site is a Right of Way. | boolean |
infill | Indicates if the site is an infill. | boolean |
intact | Indicates if the site is intact. | boolean |
smartLocation | Indicates if the site is a smart location. | boolean |
mduClass | Specifies the MDU class, e.g. 0-6, NULL. | enum |
productFamilyType | The product family type, e.g. LAYER2, CSE, COLOCATION, RBI, etc. | enum |
businessClassification | The business classification for a campaign, e.g. Standard, BusinessPremium. | enum |
locationId | The TLC for a campaign. | string |
includeAssets | Optionally include the assets in the task, e.g. None, Unpopulated, Populated. | enum |
The returned task includes pre-defined activities, depending on the taskType and siteVisitTypes specified.
Create an Assure task
The following table describes the attributes required for creating an Assure (REMI, REMS, REMO) task:
Attribute | Details | Type |
---|---|---|
workType | The type of work, e.g. REMI, REMS or REMO | enum |
areaSite | The area site for non-schedule based work types, e.g. NP09AK_NTH. | string |
classOfWork | The class of work for non-schedule based work types, e.g. GPON, see Source-specific rules below | string |
equipmentType | Type of equipment, e.g. POLT. | string |
mgmtArea | The exchange code. | string |
faultType | The type of fault, e.g. Power. | string |
node | The affected equipment asset characteristics value for the node, e.g. ALY/Q. | string |
medicalEscalation | Indicates if this is a medical escalation task (only for REMO work types). | boolean |
criticalResponse | Indicates if this is a critical response task (only for REMO work types). | boolean |
medicalEscalation | Indicates if this is a medical escalation task (only for REMO work types). | boolean |
The returned task includes a single DiagnoseRepair activity, with taskType and and a random priority set.
Source-specific rules
Source | Attribute values | Create / update task |
---|---|---|
PFM | classOfWork = Security equipmentType = SBP or SPC | Create a REMS task. |
SNOC (Spark Network Ops Centre) for UGC and Downer | classofWork = UTMS, WIFI or LANDMOBILE | Create a REMI task with the SNOC payload, including the node. Add supplementary references. |
SNOC (Spark Network Ops Centre) for PFM | classOfWork = PLANT equipmentType = ACPWR, DCPWR, HEVAC, MECH, MISC, SBYPWR or SUMP | Create a REMI task with the SNOC payload, including the node and without the equipment details. Add supplementary references. |
GNOC (Nokia Network Ops Centre) | classOfWork not one of above | Create a REMI task with the existing structure. Add a supplementary reference: NEW ENHANCEMENT - NO NODE DATA in Asset data, see Update a task below. |
Lifecycle Events
Within the Work Request lifecycle there are other scenarios that require Chorus-initiated events to occur. The WRM Trigger API allows users to self-initiate these events against a given Task or Activity to enable end-to-end testing.
The WRM Trigger is also used during the lifecycle of a work request whenever a Chorus / Work Requestor action is required to initiate an action from the Work Supplier, including:
- Cancel a task
- Put a task on hold
- Resume a held task
- Update a task
- Add an activity
- Cancel an activity
- Reschedule an activity
- Update an activity
Cancel a task
POST /trigger/CancelTask
Use this endpoint to cancel a task assigned to you, as the work requestor.
The following table describes the attributes required for cancelling a task:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
reason | The reason for the cancellation, e.g. CT, CO, or CM. | enum |
Put a task on hold
POST /trigger/PutOnHoldTask
Use this endpoint to place a task assigned to you on hold, as the work requestor.
The following table describes the attributes required for placing a task on hold:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
Resume a held task
POST /trigger/ResumeTask
Use this endpoint to resume a task assigned to you that has been put on hold, as the work requestor.
The following table describes the attributes required for resuming an on hold task:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
Update a task
POST /trigger/UpdateTaskAssets
POST /trigger/UpdateTaskAdditionalInfos
POST /trigger/UpdateTaskSource
POST /trigger/UpdateTaskSupplementaryReferencesEvent
Use these endpoints to update the various attributes of a task, as the work requestor.
Note: Default data is provided in the updated task.
The following table describes the attributes required for updating a task:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
Add an activity
POST /trigger/AddTaskActivity
Use this endpoint to add an activity to an existing task, as the work requestor.
Note: Only for FibreConnect tasks.
The following table describes the attributes required for adding an activity:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
activityType | The type of activity to add, e.g. LastStepFibre, OHUG, or Infill. | enum |
Cancel an activity
POST /trigger/RequestCancelTaskActivity
Use this endpoint to request the cancellation of an activity, as the work requestor.
The following table describes the attributes required for requesting a cancellation of an activity:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
activityId | The activity identifier, e.g. 4157c5b6-cbb1-4bbb-b667-fb20e475e55f. | string |
reason | The reason for the cancellation, e.g. CT, CO, or CM. | enum |
Reschedule an activity
POST /trigger/UpdateTaskActivityScheduleByWorkRequestor
Use this endpoint to update the schedule of an activity, as the work requestor.
Note: The updated appointment is based on the existing appointment and task creation date.
The following table describes the attributes required for updating an activity's schedule:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
activityId | The activity identifier, e.g. 4157c5b6-cbb1-4bbb-b667-fb20e475e55f. | string |
rescheduleReason | The reason for the reschedule, e.g. ChorusAdviseChange. | enum |
Update an activity
POST /trigger/UpdateTaskActivitySite
POST /trigger/UpdateTaskActivitySiteContacts
Use these endpoints to update the various attributes of an activity, as the work requestor.
Note: Default data is provided in the updated activity.
The following table describes the attributes required for updating an activity:
Attribute | Details | Type |
---|---|---|
taskId | The task identifier, e.g. 210730440318. | string |
activityId | The activity identifier, e.g. 4157c5b6-cbb1-4bbb-b667-fb20e475e55f. | string |